function sys=obv(t,x,U,Qk,ot,e,de)
sys=zeros(4,1);

m=1.12;g=9.81;
Ix=0.0119;Iy=0.0119;Iz=0.0223;
b=0.00000773213;d=0.000000127513;Jr=0.00085;l=0.23;
kp1=1.2;kp2=1.2;kp3=1.2;kp4=5.62;
kint1=3.1;kint2=3.1;kint3=3.1;kint4=7.2;
kd1=0.08;kd2=0.08;kd3=0.03;kd4=1.0;
beta1=1.0;beta2=1.0;beta3=3;beta4=2.0;
lamb1=1.2;lamb2=1.2;lamb3=4;lamb4=1.01;
gama1=0.72;gama2=0.72;gama3=0.21;gama4=22;
OHM=1000;

Ixx=0.0119;Iyy=0.0119;Izz=0.0223;
a1=(Iyy-Izz)/Ixx;a2=Jr/Ixx;
a3=(Izz-Ixx)/Iyy;a4=-Jr/Iyy;
a5=(Ixx-Iyy)/Izz;b1=l/Ixx;
b2=l/Iyy;b3=l/Izz;
kf1=0.05;kf2=0.05;kf3=0.1;k3=0.1;

alpha=0.01;J=0.01;OHM=1;

U1=U(1);U2=U(2);U3=U(3);U4=U(4);
x1=Qk(1);x2=Qk(2);x3=Qk(3);x4=Qk(4);
x5=Qk(5);x6=Qk(6);x7=Qk(7);x8=Qk(8);
x9=Qk(9);x10=Qk(10);x11=Qk(11);x12=Qk(12);

e1=e(1);e2=e(2);e3=e(3);e4=e(4);
de1=de(1);de2=de(2);de3=de(3);de4=de(4);
dt1=ot(1);dt2=ot(2);dt3=ot(3);dt4=ot(4);

sys(1)=-kf1*(x4*x6*a1+x4*a2*OHM+b1*U2+dt1)+alpha*1/J*e1+de1;
sys(2)=-kf2*(x2*x6*a3+x2*a4*OHM+b2*U3+dt2)+alpha*1/J*e2+de2;
sys(3)=-kf3*(x2*x4*a5+b3*U4+dt3)+alpha*1/J*e3+de3;
sys(4)=-k3*(g-1/m*(cos(x1)*cos(x3)*U1)+dt4)+de4;

